<%@ page language="java"
	import="java.util.*,com.zhuozhengsoft.pageoffice.*"
	pageEncoding="utf-8"%>

<%
PageOfficeCtrl poCtrl=new PageOfficeCtrl(request);
//设置服务器页面
poCtrl.setServerPage(request.getContextPath()+"/poserver.zz");
//添加自定义按钮
poCtrl.addCustomToolButton("关闭","Close",21);

//打开Word文档
poCtrl.webOpen("doc/test.doc",OpenModeType.docNormalEdit,"张佚名");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
 <script type="text/javascript" src="../jquery.min.js"></script>
 <script type="text/javascript" src="../pageoffice.js"  id="po_js_main"></script>
</head>
<body>
    <script type="text/javascript">
        function Close() {
           POBrowser.closeWindow();
        }
        function increaseCount(value) {
		   var sResult = POBrowser.callParentJs("updateCount("+value+");");
           document.getElementById("PageOfficeCtrl1").Alert("现在父窗口Count的值为：" + sResult);
        }
        function increaseCountAndClose(value) {
		   var sResult = POBrowser.callParentJs("updateCount("+value+");");
           POBrowser.closeWindow();
        }
    </script>
 
    <input type="button" value="设置父窗口Count的值加1" onclick="increaseCount(1);" />
	<input type="button" value="设置父窗口Count的值加5，并关闭窗口" onclick="increaseCountAndClose(5);" /></br>
    <div style=" width:auto; height:700px;">
       <%=poCtrl.getHtmlCode("PageOfficeCtrl1")%>
    </div>

</body>
</html>

